package com.caow.androidktbase.ui.second

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.caow.androidktbase.BR
import com.caow.androidktbase.R
import com.caow.androidktbase.databinding.ActivitySecondBinding
import com.caow.androidktbase.router.ROUTER_SECOND
import com.caow.baselibrary.BaseActivity
import com.caow.baselibrary.utils.LogUtils

@Route(path = ROUTER_SECOND)
class SecondActivity : BaseActivity<ActivitySecondBinding, SecondViewModel>() {
    override fun initLayoutId(): Int =R.layout.activity_second
    override fun initViewModelId(): Int = BR.vm

    @JvmField
    @Autowired(name = "key")
    var key: String? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        LogUtils.i("caow", "参数 == $key")
        viewModel.btnTxt.set(key)
    }

    // 沉浸式
    override fun isImmersive(): Boolean {
        return true
    }
}